/*
 * UnitCreatedEvent.h
 *
 *  Created on: Oct 14, 2008
 *      Author: Ryan
 */

#ifndef UNITCREATEDEVENT_H_
#define UNITCREATEDEVENT_H_

#include "GameEvent.h"

#include <sstream>

namespace OOInterface
{

class UnitCreatedEvent: public OOInterface::GameEvent
{
public:
	UnitCreatedEvent( ConstUnitPtr unit ) : _unitCreated( unit ) { }
	virtual ~UnitCreatedEvent() {}

	ConstUnitPtr getCreatedUnit() const { return _unitCreated; }

	virtual std::string toString() const
	{
		std::ostringstream str;
		str << "Event: Unit Created. ( " << _unitCreated->getName() << " )";

		return str.str();
	}


private:
	ConstUnitPtr _unitCreated;
};

}

#endif /* UNITCREATEDEVENT_H_ */
